The latest version (with support for this Java subset) of the ITP
downloadable from the course web site has an extension of the list of
commands of the ITP specifically designed to support Hoare logic
reasoning in our programming language.

The way this extension works is as follows:

- start the latest version of Maude

- then load the included version of itp-tool.maude

- load into Maude the functional module defining the semantics of
  our language, java-es-flat.maude, (for speed reason we use
  the flattened version).

- [done for the homework already]
  define a program (BlockStatements) foo in a module foo.maude importing
  java-es-flat.maude by declaring a constant foo and giving an equation
  defining the constant as the corresponding program text. Also declare a
  constant foo-init which contains all declarations necessary for your
  program and make sure there are no ("Java") declarations in your program
  foo. The module foo.maude should also contain all \emph{auxiliary
  functions needed in a proof of correctness of program foo. (Note that
  this has already been done for you, in the files div2.maude and
  sumn.maude.)

- load foo.maude (One of the above mentioned files instead.)

- then, to prove a Hoare triple {P} foo {Q}
  you give a javax command, or a javax-inv command
  which also needs an invariant.  

In the homework this command has already been spelled out for you in
"sumn.itp" whereas in "div2.itp" the invariant is missing. Before
loading "div2.itp" you need to enter your own invariant in the marked
place. Then you can interact with the ITP tool to discharge the created
first-order goals in both cases.

Note that you can write your solution (i.e. the commands you used to
discharge a goal) directly below the javax-inv command and then in one
shot load the module which will create the goal and discharge it.
